package xh.lumt.server;

/**
 * Created by HanXiong on 2016/9/22.
 */
public class PlayStatusInfo {

    private String musicUrl;

    private double totalSeconds;

    private double volume;

    // 假设各个客户端时间一致，当前播放进度通过计算得到即可
    private long startPlayTime = -1;

    private double startPlayFromSecond = 0.0d;

    private long updateTime = -1;

    private boolean isPlaying = false;

    public PlayStatusInfo copy() {
        PlayStatusInfo p = new PlayStatusInfo();
        p.musicUrl = this.musicUrl;
        p.totalSeconds = this.totalSeconds;
        p.volume = this.volume;
        p.startPlayTime = this.startPlayTime;
        p.startPlayFromSecond = this.startPlayFromSecond;
        p.updateTime = this.updateTime;
        p.isPlaying = this.isPlaying;
        return p;
    }


    public String getMusicUrl() {
        return musicUrl;
    }

    public void setMusicUrl(String musicUrl) {
        this.musicUrl = musicUrl;
    }

    public double getTotalSeconds() {
        return totalSeconds;
    }

    public void setTotalSeconds(double totalSeconds) {
        this.totalSeconds = totalSeconds;
    }

    public double getVolume() {
        return volume;
    }

    public void setVolume(double volume) {
        this.volume = volume;
    }

    public long getStartPlayTime() {
        return startPlayTime;
    }

    public void setStartPlayTime(long startPlayTime) {
        this.startPlayTime = startPlayTime;
    }

    public double getStartPlayFromSecond() {
        return startPlayFromSecond;
    }

    public void setStartPlayFromSecond(double startPlayFromSecond) {
        this.startPlayFromSecond = startPlayFromSecond;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }

    public boolean isPlaying() {
        return isPlaying;
    }

    public void setPlaying(boolean playing) {
        isPlaying = playing;
    }
}
